package connectionPool;

public class Test {
	public static void main(String[] args) throws Exception {
		ConnectionPool pool = new ConnectionPool(
				"jdbc:oracle:thin:@localhost:1521:xe", "hr", "root");
		MyConnection c1 = pool.checkout();
		pool.checkin(c1);
		pool.checkin(c1);
		pool.checkin(c1);
		pool.checkin(c1);
		pool.checkin(c1);
		pool.checkin(c1);
		pool.checkin(c1);
		pool.checkin(c1);

		MyConnection c2 = pool.checkout();
		MyConnection c3 = pool.checkout();

		System.out.println(c1 + " " + c2 + " " + c3);
	}
}
